﻿using GalaSoft.MvvmLight;
using mal.balades.Map.MapServices;

namespace mal.balades.Map.ViewModel
{
    /// <summary>
    /// This class contains properties that a View can data bind to.
    /// <para>
    /// Use the <strong>mvvminpc</strong> snippet to add bindable properties to this ViewModel.
    /// </para>
    /// <para>
    /// You can also use Blend to data bind with the tool's support.
    /// </para>
    /// <para>
    /// See http://www.galasoft.ch/mvvm/getstarted
    /// </para>
    /// </summary>
    public class VisitViewModel : ViewModelBase
    {
        private MapVisitList visit;

        public VisitViewModel()
        {
            if (IsInDesignMode)
            {
                visit = new MapVisitList();
                visit.Title = "Titre de la balade";
            }
        }

        /// <summary>
        /// Initializes a new instance of the VisitControlViewModel class.
        /// </summary>
        public VisitViewModel(MapVisitList visit)
        {
            this.visit = visit;
        }

        public string PlaceCategoryPicture 
        {
            get
            {
                return this.visit.PlaceCategoryPicture;
            }
        }

        public string Title
        {
            get
            {
                return this.visit.Title;
            }
        }

        public string SumUp
        {
            get
            {
                return this.visit.SumUp;
            }
        }

        public string Url
        {
            get
            {
                return this.visit.Url;
            }
        }

        public string Picture
        {
            get
            {
                return this.visit.Picture;
            }
        }
        ////public override void Cleanup()
        ////{
        ////    // Clean own resources if needed

        ////    base.Cleanup();
        ////}
    }
}